//1.适配器模式的定义掩饰

//这是需要进行适配的类
class Socket {
  outpot() {
    return '220v'
  }
};

// 抽象类
abstract class Power{
  abstract change(): string;
};
//适配器类
class  PowerAdaptor extends Power{
  constructor(public socket:Socket) {
    super()
  };
  change() {
    return this.socket.outpot()+'转24v'
  }
};
let adaptor = new PowerAdaptor(new Socket());
console.log(adaptor.change());